﻿using System;
using JetBrains.Annotations;
using Missbot.AIModule.Base;
using Missbot.Core.Base;
using Missbot.Core.Common;

namespace Missbot.AIModule.Sys
{
    [UsedImplicitly]
    public class MonitorMod : IAIModule
    {
        public override string Name => "监视器";
        public override string ParentTag => "系统功能";

        [ModuleEnter(Command = "系统状态", Description = "获取机器人当前状态")]
        public bool SystemStutas(InboxSession session)
        {
            var startTime = AIAnalyzer.Sys_StartTime;
            var span = DateTime.Now - startTime;

            var msg = $"系统已成功运行{span.Days}天{span.Hours}小时{span.Minutes}分{span.Seconds}秒";
            session.SendBack(msg);
            return true;
        }
    }
}